package com.avic.modules.equipment.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * @author zhangzikang 站位表
 * @date 2022-08-14
 */
@Data
@TableName("station")
@NoArgsConstructor
public class Station implements Serializable {

    // 前天设备数
    @TableField(exist = false)
    private Integer frontEquipTotal;

    // 前天运行设备数
    @TableField(exist = false)
    private Integer frontFunctionTotal;

    // 前天健康设备数
    @TableField(exist = false)
    private Integer frontHealthyTotal;

    // 设备数
    @TableField(exist = false)
    private Integer equipTotal;

    // 运行设备数
    @TableField(exist = false)
    private Integer functionNumber;

    // 健康设备数
    @TableField(exist = false)
    private Integer healthyTotal;

    // 站位id
    private String id;

    // 站位名称
    private String name;

    /** 详情 */
    @TableField(exist = false)
    private List<Equipment> stationAll;

    /** 详情 */
    @TableField(exist = false)
    private List<Equipment> equipment;

    public void copy(Station source) {
        BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
